feat(projects): streamline project creation controls - #6677
Conversation
Give agents bounded project-home context and project-aware CLI operations while keeping channel matching client-filtered through the existing relay query surface. Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz> Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz> Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
## Summary - create explicit NIP-MP projects with a home channel and default repository - preserve standalone repository folding, project deletion, and deterministic repository selection - restore Template, Team, visibility, and agent settings in the project creation flow This is Part 2 of the channel-first Projects stack, following #6590. It is independently based on `main`; Part 3 adds the project-home channel surface. ## Testing - focused project collection, creation, channel, and model tests: 38/38 passed - Desktop unit suite: 5,415/5,415 passed - TypeScript, Biome, and differential file-size checks passed - full pre-push gate passed ## Post-Deploy Monitoring & Validation - create listed and unlisted projects with and without templates in the first staging Desktop session - healthy signals: one home channel, one default repository, stable project coordinates, and no duplicate legacy card - failure signals: partial project creation, duplicate projects, missing default repository, or stale sidebar entries; mitigate by reverting this PR --------- Signed-off-by: Thomas Petersen <thomasp@squareup.com>
## Summary - classify and render project-home channels through the shared channel glyph and lifecycle helpers - let the normal channel pane host a project idle auxiliary surface and focus drawer - align channel management, headers, member bars, and empty-channel actions with project channel semantics This is Part 3 of the channel-first Projects stack, based on #6591. Part 4 adds the project-home navigation and context experience. ## Testing - focused channel lifecycle, pane helper, and project-home channel tests: 7/7 passed - Desktop unit suite: 5,422/5,422 passed - E2E-mode Desktop build passed - TypeScript, Biome, and differential file-size checks passed - full pre-push gate passed ## Post-Deploy Monitoring & Validation - open normal, temporary, private, and project-home channels in the first staging Desktop session - healthy signals: normal channels retain their existing composer/thread behavior and project homes use the project glyph and auxiliary slot - failure signals: missing composer, incorrect channel kind, stuck focus drawer, or project chrome on a normal channel; mitigate by reverting this PR --------- Signed-off-by: Thomas Petersen <thomasp@squareup.com> Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz> Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
## Summary - render an explicit project's home channel through the normal channel timeline and composer - add a resizable project context rail with codebase, channel, people, and workspace navigation - keep project agent conversations bounded to the project home and preserve repository/detail routes This is Part 4 of the channel-first Projects stack, based on #6594. The final part contains overview and workspace completion polish. ## Testing - focused project conversation, route, summary, workspace-sheet, and related-channel tests: 39/39 passed - Desktop unit suite: 5,439/5,439 passed - E2E-mode Desktop build passed - TypeScript, Biome, and differential file-size checks passed - full pre-push gate passed ## Post-Deploy Monitoring & Validation - open project homes from project and channel entry points in the first staging Desktop session - healthy signals: one channel timeline/composer, stable repository context, bounded project agent history, and reversible workspace sheets - failure signals: duplicate channel surfaces, stale repository selection, unrelated DM history, or sheets replacing the channel route; mitigate by reverting this PR Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz> Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Open project homes consistently from channel and project routes, preserve file/work-item deep links, and let agents request owner-reviewed project channels. Signed-off-by: Thomas Petersen <thomasp@squareup.com> Co-authored-by: Thomas Petersen <thomasp@squareup.com>
## Summary - make the Projects overview follow the active section with consistent context, empty states, and row alignment - add an animated section-local search that preserves sort and responsive tab behavior - simplify sidebar and list controls while keeping large project collections incrementally mounted This is Part 6 of the channel-first Projects stack, based on #6597. The final part contains project workspace aggregation and the default project-home template. ## Testing - focused search, activity digest, agent selection, related-channel, and overview-context tests: 26/26 passed - Desktop unit suite: 5,451/5,451 passed - E2E-mode Desktop build passed - TypeScript, Biome, and differential file-size checks passed - full pre-push gate passed ## Post-Deploy Monitoring & Validation - exercise every Projects overview section, search transition, selection state, and right context rail in staging Desktop - healthy signals: stable tabs, aligned rows, correct section context, and responsive large-list interaction - failure signals: search flicker, stale context, wrapped toolbar rows, missing empty actions, or input lag; mitigate by reverting this PR --------- Signed-off-by: Thomas Petersen <thomasp@squareup.com> Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz> Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Complete project-home defaults, category-specific creation, responsive grouping, and project-wide task and commit views across every repository. Signed-off-by: Thomas Petersen <thomasp@squareup.com> Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Give project workspace sheets explicit auxiliary priority so Tasks, Reviews, Commits, Files, and People remain accessible without discarding an open conversation thread. Signed-off-by: Thomas Petersen <thomasp@squareup.com> Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Make workspace-sheet precedence independent of whether the active thread uses a focus drawer, split pane, or narrow auxiliary layout. Signed-off-by: Thomas Petersen <thomasp@squareup.com> Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Suppress the browser-default outline on the programmatically focused drawer while retaining focus indicators on its interactive controls. Signed-off-by: Thomas Petersen <thomasp@squareup.com> Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Route non-DM sidebar icons through the shared channel glyph so project-home channels render with their project folder mark. Signed-off-by: Thomas Petersen <thomasp@squareup.com> Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Collapse the context rail before a workspace drawer enters so the sheet keeps a fixed width, and hide the sidebar-style resize guide without removing resizing. Signed-off-by: Thomas Petersen <thomasp@squareup.com> Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Use the stateful drawer affordance in both wide and narrow Projects layouts so context controls match the rest of the project surfaces. Signed-off-by: Thomas Petersen <thomasp@squareup.com> Co-authored-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Thomas Petersen <thomasp@squareup.com> Signed-off-by: Thomas Petersen <thomasp@squareup.com>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz> Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz> Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Co-authored-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz> Signed-off-by: Wrench <0eabe6ea5758c1e4c5b68cea4ac42b32c479072883cb28da8110b4a47c32b9a1@buzz.block.builderlab.xyz>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
| const addedProjectAddresses = useProjectSidebarMembership( | ||
| relayOrigin, | ||
| currentPubkey, | ||
| ); |
There was a problem hiding this comment.
The sidebar already mounts useProjectSidebarMembership for this scope, so mounting it again here creates a second relay subscription and sync manager. A membership change while the overview remains open can make both managers schedule encrypted replacement-event publications independently, producing redundant writes and potentially competing equal-timestamp heads. Consider sharing the synchronized membership state or adding a read-only consumer for this selected-address set.
Generated by AI
jedwards27
left a comment
There was a problem hiding this comment.
Verdict: REQUEST CHANGES
Reviewed: c5f60a2d3b2df40b81d4134c65ebd96662924975..4754ef7eef057289a8f78bc05dc823714eb616e3 (exact head 4754ef7eef057289a8f78bc05dc823714eb616e3)
Risk: medium — user-visible project creation/navigation plus owner-bound private/unlisted readback and pin/list state.
Blocking finding
- [P2] Restore the required Desktop file-size gate.
desktop/src/features/projects/ui/ProjectsView.tsxis 1,023 lines, over the 1,000-line ratchet. Exact-headjust file-size-checkfails locally (990 -> 1023, +33), and GitHub run32704521600, job97362698027, reports the same failure (986 -> 1023, +37). Path detection then skips Desktop Core, smoke E2E, and downstream lanes. The live PR is also conflicting/dirty against its base, so the resulting conflict-resolved revision has not received required CI.
Author action: rebase and resolve the base conflict; extract or shrink ProjectsView.tsx below the ratchet; obtain fresh exact-head CI.
Verification owner: author for the conflict/code repair; CI and :bot: Jude’s code review agent for the fresh-head gates and delta review.
Behavior/contracts traced
The signed project-event pubkey is now used for owner reconstruction (createProject.ts:88-101), owner-only unlisted admission remains enforced (projectModels.ts:454-461), and creation pins under relay+owner scope while optimistically inserting/deduplicating before invalidation (useCreateProject.ts:39-56). This aligns with VISION_PROJECTS.md:55-73,138. Focused coverage passed for private+unlisted owner readback, publication retry, lost-ack idempotency, project browsing/creation, sidebar pinning, and the overview indicator. Removing only viewerPubkey: projectEvent.pubkey causally failed owner readback; restoring it passed again. A 640 px capture retained a visible, usable persistent add control.
Validation at clean exact head
- PASS —
pnpm --dir desktop typecheck - PASS —
pnpm --dir desktop check(reported warnings were outside this change’s intent) - PASS —
pnpm --dir desktop test: 5,473/5,473 - PASS — focused private+unlisted creation E2E: 1/1, including causal mutation proof
- PASS — focused retry, lost-ack idempotency, and header add-flow coverage
- FAIL —
just file-size-check, as above
A broad project smoke attempt (7 pass/63 fail) is not reliable regression evidence: failures cascaded after the web server exited with ERR_CONNECTION_REFUSED, and initial stale helpers waited for the prior add-control path; the implicated retry case passed in focused isolation.
Manual/native evidence: narrow 640 px browser capture only; no exact-head native/real-relay restart journey.
Residual risk: mock E2E and source tracing establish the changed frontend contract, but not real-relay propagation/restart persistence. Rerun required project smoke coverage on the fresh conflict-resolved head with a stable server lifecycle/selectors. This is reviewer/tooling verification, not additional author rework beyond the blocker above.
Summary
Root cause
Private + unlisted creation published successfully, but immediate read-model reconstruction omitted the viewer pubkey. The owner’s own unlisted project was therefore filtered from the result and the UI reported that the created project could not be read.
Screenshots
Add project in the persistent header
Narrow layout
Private + unlisted creation succeeds and pins the project
Unlisted status is now a quiet icon
Testing
pnpm --dir desktop typecheckpnpm --dir desktop checkpnpm --dir desktop test(5,473 passed)A full Desktop Playwright attempt reached 1,080 passing tests. Four unrelated tests failed before the shared web server exited; later failures were a connection-refused cascade. The three affected Projects specs were then rebuilt and rerun together: 70/70 passed.
Non-goals